﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8" />
    <title>驰骋流程&表单设计器 </title>
    <script src="../../Scripts/QueryString.js" type="text/javascript"></script>
    <script src="../../Scripts/easyUI/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="../../Scripts/config.js" type="text/javascript"></script>
    <script src="../../Comm/Gener.js" type="text/javascript"></script>
    <base target="_self" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link href="../../Style/skin/css/login.css" rel="stylesheet" type="text/css" />
    <link href="../../Scripts/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">

        document.onkeydown = function (e) {
            e = e || window.event;
            if (e.keyCode == 13) {
                Login();
                return false;
            }
        }
     
        //初始化页面函数.....
        $(function () {

            if (! +[1, ]) {
                //  alert("这是ie浏览器，您只能使用sliverlight版本浏览器。");
                // window.location.href = '../XAP/Designer.htm';
                // return;
            }

            $("#Msg").html("<img src='../../Img/loading.gif' /><font color=blue>ccbpm 正在为登录/自动升级做准备.</font>");

            document.getElementById("Btn_Login").disabled = 'disabled';
            var doType = GetQueryString("DoType");
            if (doType == null)
                doType = "Login_Init";

            var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_CCBPMDesigner");
            var data = handler.DoMethodReturnJSON("Login_InitInfo");
            document.title = data.SysName;

            //执行更新检查..
            handler.AddUrlData();
            data = handler.DoMethodReturnString(doType);

            if (data.indexOf('err@') == 0) {

                $("#Msg").html("<font color=red>" + data + ". 也许是: java/.net/phtyon 运行环境没有准备好导致的. 请确认运行环境</font>");
                return;
            }

            if (data.indexOf('url@') == 0) {
                var url = data.replace('url@', '');
                window.location.href = url;
                return;
            }

            document.getElementById("Btn_Login").disabled = false;
            $("body").keydown(function () {
                if (event.keyCode == 13) {
                    event.cancelBubble = true;
                    event.returnValue = false;
                    Login();
                }
            });

            $("#Msg").html("<font color=green>" + data + "</font>");

        });

        //执行后台登录.
        function Login() {

            $("#Msg").html("<font> ccbpm 正在登录流程&表单引擎设计器,请稍候... </font>");

            var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_CCBPMDesigner");

            var userNo = $("#TB_No").val();
            var pass = $("#TB_PW").val();

            if (userNo == "" || pass == "") {
                $("#Msg").html("<font>请输入用户名，密码.</font>");
                return;
            }

            handler.AddPara("TB_No", userNo);
            handler.AddPara("TB_PW", pass);

            var data = handler.DoMethodReturnString("Login_Submit");

            if (data.indexOf('err@') == 0) {
                $("#Msg").html("<font color=red>" + data + "</font>");
                return;
            }

            if (data.indexOf('url@') == 0) {
                window.location.href = data.replace('url@', '');
                return;
            }
            alert(data);
        }
    </script>

       <script type="text/javascript" language="javascript">    
       </script>

</head>

<body class="login-bg">

        <form id="cc" >
<div class="login-box_admin">
           <h1 class="logo-name">驰骋流程&表单设计器</h1>
           <div class="login-form">
             <form id="Form1" >
                <div class="form-group">
                    <input type="text" id="TB_No" name="TB_No" value="admin" placeholder="请输入账号" lay-verify="required"  class="form-control" />
                </div>
                <div class="form-group">
                    <input type="password" id="TB_PW" name="TB_PW" placeholder="请输入密码" lay-verify="required"  class="form-control"  />
                </div>
                <input type="button" class="btn btn-primary btn-block"  value="管理员&二级管理员:登录" id="Btn_Login" onclick="Login();"   />
            <div class="row login-nav">
            	<div class="col-xs-6">默认密码：123</div>
            	<div class="col-xs-6 ">

                <a href="../../AppClassic/Login.htm"  class="pull-right">前台登录</a><a href="../../../Portal/Login.htm"  class="pull-right">GPM登录-</a>
                <a href="http://ccbpm.mydoc.io" target=_blank class="pull-right">帮助文档&nbsp;&nbsp;</a>

                </div>
                <br />
                <div id="Msg" style=" float:right" />    </div> 
            </div>

              
        </div>
   </div>
      
           
           </form>


</body>
</html>
